
package analisadorlexico;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author Anderson Vinicius
 */
public class Main {

    public static void main(String[] args) throws FileNotFoundException, IOException {
        ProcessadorLexico lexico = new ProcessadorLexico();

        String program = "";
        int caracter;
        BufferedReader reader = new BufferedReader(new FileReader("teste.txt"));
        while((caracter = reader.read()) != -1) {
            program += (char) caracter;
        }

        lexico.run(program);

        System.out.println(lexico.getTabela().toString());
        System.out.println(lexico.getErros().toString());
    }
}
